package com.lemon.boot.common.consts;

import com.lemon.boot.common.enums.DeleteEnum;
import com.lemon.boot.common.enums.StatusEnum;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

/**
 * @author 李猛
 * @datetime 2024/2/17 0:19
 * @description 类对象
 */
public final class ApiConst {
    //顶级父ID
    public static final Long SUPER_PARENT_ID = -1L;

    //顶级部门
    public static final String SUPER_DEPT_NAME = "顶级部门";

    //顶级菜单
    public static final String SUPER_MENU_NAME = "顶级菜单";

    //项目文件夹绝对路径
    public static final String SYSTEM_DIR = System.getProperty("user.dir");

    //项目包路径
    public static final String SYSTEM_PACKAGE = "com.lemon.boot";

    //代码生成-java文件生成位置
    public static final String GENERATOR_JAVA_OUTPUT_DIR = String.format("%s%ssrc%smain%sjava", SYSTEM_DIR, File.separator, File.separator, File.separator);

    //代码生成-XML文件生成位置
    public static final String GENERATOR_XML_OUTPUT_DIR = String.format("%s%ssrc%smain%sresources%sdao", SYSTEM_DIR, File.separator, File.separator, File.separator, File.separator);


    public static Map<String, Object> enableStatusAndUnableDelete() {
        Map<String, Object> param = enableStatus();
        param.put(DeleteEnum.UNABLE.getColumn(), DeleteEnum.UNABLE.getDeleted());
        return param;
    }

    public static Map<String, Object> enableStatus() {
        Map<String, Object> param = new HashMap<>();
        param.put(StatusEnum.ENABLE.getColumn(), StatusEnum.ENABLE.getStatus());
        return param;
    }
}
